From 157e1a5562556b6799d3660ee94801e020bf1d8b Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Thu, 27 Jan 2005 16:02:39 +0000 Subject: [PATCH] bitkeeper revision 1.1159.223.47 (41f9109fKznqwLcV_lTngHAhBvwOZw) Minor domU net-backend fixes. --- linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c | 3 +-- tools/python/xen/xend/XendDomainInfo.py | 2 +- tools/python/xen/xend/server/netif.py | 6 ++++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c index 61626a7b91..ee53c8b1a6 100644 --- a/linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c +++ b/linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c @@ -1295,8 +1295,7 @@ static int __init netif_init(void) { int err = 0; - if ( (xen_start_info.flags & SIF_INITDOMAIN) || - (xen_start_info.flags & SIF_NET_BE_DOMAIN) ) + if ( xen_start_info.flags & SIF_INITDOMAIN ) return 0; IPRINTK("Initialising virtual ethernet driver.\n"); diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 1a229a5599..05647c83ab 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -449,9 +449,9 @@ class XendDomainInfo: self.init_domain() self.configure_console() + self.configure_backends() self.construct_image() self.configure_restart() - self.configure_backends() deferred = self.configure() def cberr(err): self.destroy() diff --git a/tools/python/xen/xend/server/netif.py b/tools/python/xen/xend/server/netif.py index 9152c2abf4..d63c342435 100755 --- a/tools/python/xen/xend/server/netif.py +++ b/tools/python/xen/xend/server/netif.py @@ -140,7 +140,8 @@ class NetDev(controller.SplitDev): self.ipaddr = self._get_config_ipaddr(config) or [] try: - self.backendDomain = int(sxp.child_value(config, 'backend', '0')) + xd = get_component('xen.xend.XendDomain') + self.backendDomain = int(xd.domain_lookup(sxp.child_value(config, 'backend', '0')).id) except: raise XendError('invalid backend domain') @@ -161,7 +162,8 @@ class NetDev(controller.SplitDev): bridge = sxp.child_value(config, 'bridge') script = sxp.child_value(config, 'script') ipaddr = self._get_config_ipaddr(config) - backendDomain = sxp.child_value(config, 'backend', '0') + xd = get_component('xen.xend.XendDomain') + backendDomain = str(xd.domain_lookup(sxp.child_value(config, 'backend', '0')).id) if (mac is not None) and (mac != self.mac): raise XendError("cannot change mac") if (backendDomain is not None) and (backendDomain != str(self.backendDomain)): -- 2.30.2